<!DOCTYPE html>
<body>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
    var input = document.createElement('input');
    input.type = 'color';
    input.oninput = function() {
        this.type = 'text';
    };
    internals.selectColorInColorChooser(input, '#ff0000');
}, 'Changing the input type from "color" to another in "input" event handler should not crash.');
</script>
